package com.jingdianjichi.subject.common.enums;

import lombok.Getter;

/**
 * ClassName:IsDeletedFlagEnum
 * Package:IntelliJ IDEA
 * Description:     删除状态枚举
 *
 * @Author xiaoming
 * @Create 2025-02-02 0:14
 * @Version 1.0
 */
@Getter
public enum IsDeletedFlagEnum {
    DELETED(1,"已删除"),
    UN_DELETED(0,"未删除");

    public int code;
    public String desc;

    IsDeletedFlagEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;

    }

    public IsDeletedFlagEnum getByCode(int codeVal){
        for(IsDeletedFlagEnum resultCodeEnum : IsDeletedFlagEnum.values()){
            if(resultCodeEnum.code == codeVal){
                return resultCodeEnum;
            }
        }
        return null;
    }

}
